import request from '@/utils/request'
import upload from '@/utils/upload'


// 报名
export function registration(data) {
    return request({
        url: '/project/registration',
        method: 'post',
        data: data
    })
}

// 上传文件（单个）
export function uploadFile(data) {
    return upload({
        url: '/common/upload',
        name: data.name,
        filename: data.name,
        filePath: data.filePath
    })
}

// 通用上传请求（多个）
export function uploadFiles(data) {
    return upload({
        url: '/common/uploads',
        name: data.name,
        filePath: data.filePath
    })
}

export function getProActivity() {
    return request({
        url: '/project/activities/getProActivity',
        method: 'get'
    })
}
export function listByH5(query) {
    return request({
        url: '/project/registration/listByH5',
        method: 'get',
        params: query
    })
}


export function updateRegistration(data) {
    return request({
        url: '/project/registration',
        method: 'put',
        data: data
    })
}

export function getInfo(id) {
    return request({
        url: '/project/registration/' + id,
        method: 'get'
    })
}

export function sendEmail(data) {
    return request({
        url: '/project/activities/sendEmail',
        method: 'post',
        data: data
    })
}





